<template>
	<view style="width: 100%;">
		<view class="nav-container">
			<text v-if="back" class="iconfont icon-guanbi1" @tap="tapBack"></text>
			<text class="nav-title"></text>
			<slot></slot>
		</view>
	</view>
</template>

<script>
	export default {
		name:"navi-shell",
		props:{
			title:{
				type:String,
				required:false
			},
			back:{
				type:Boolean,
				default:true,
				required:false
			}
		},
		data() {
			return {
				
			};
		},
		methods:{
			tapBack(){
				uni.navigateBack()
			}
		}
	}
</script>

<style>
	.nav-container{
		width: 100%;
		height: 44px;
		display: flex;
		flex-direction: row;
		align-items: center;
		background-color: red;
		box-sizing: border-box;
	}
	.icon-guanbi1{
		font-size: 60rpx;
		font-weight: 100;
		color: white;
		margin-top: 1rpx;
		margin-left: 1rpx;
		height: 100%;
	}
	.nav-title{
		color: white;
		font-size: 32rpx;
		font-weight: bold;
		text-align: center;
		flex-grow: 1;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}

</style>
